#-*-coding:utf-8-*-
import datetime
import time
import traceback
from pprint import pprint
from pymongo.connection import MongoClient

class MongoDb():
    def __init__(self):
        client = MongoClient('localhost',27017)
        self.db = client['gather']
        self.coll = self.db['goods']

    def find(self,query):
        list = self.coll.find(query)
        return list

    def save(self,id,update):
        self.coll.update({'_id':id},{'$set':update})
